package com.zsxb.crm.mapper;

import com.github.pagehelper.Page;
import com.zsxb.crm.annotation.AutoFill;
import com.zsxb.crm.dto.TransferPageDTO;
import com.zsxb.crm.enumeration.OperationType;
import com.zsxb.crm.pojo.Business;
import com.zsxb.crm.pojo.Clue;
import com.zsxb.crm.pojo.Transfer;
import com.zsxb.crm.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface TransferMapper {

    Page<Transfer> pageQuery(TransferPageDTO dto);

    @Select("select * from tb_transfer")
    List<Transfer> queryAll();

    @AutoFill(OperationType.INSERT)
    void insertUserIntoTransfer(List<User> userList);

    void delete();

    Map<Integer,Integer> insertClueNum(Map<Integer,Integer> clueNum);

    Map<Integer,Integer> insertBusinessNum(Map<Integer,Integer> businessNum);

    void insert(Transfer transfer);

    @AutoFill(OperationType.UPDATE)
    void updateDate(Long userId, Integer clueNum, Integer businessNum);
}
